<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/modules/Music/classes/PhpFox_ComponentGenreView.class.php, $Author:  $ */



/** Component for viewing genres
 *   
 * @version $Id: PhpFox_ComponentGenreView.class.php 46 2007-12-14 23:12:21Z phpfoxsv $
 * @package module.music
 */
class PhpFox_Mod_Music_ComponentGenreView extends BaseComponent
{
    function process()
    {
        $oGenreItem    = &$this->_oModule->getItem('Genre');
        /* @var $oMusicService PhpFox_Mod_Music_ItemGenre */
        $oMusicService = &$this->_oModule->getService('Music');
        /* @var $oMusicService PhpFox_Mod_Music_ServiceMusic */
        $oTpl = &$this->_oModule->getTemplate();
        
//        $oReq = &App::getRequest();
//        d($oReq);
        $aCond = array();

        $sSort = 'genre_name ';
        list($aGenres, $iCnt) = $oGenreItem->getList($aCond, 0, 0, $sSort);
                
//        list($aGenres,$iCount) = $oMusicService->getGenresList();

        $oTpl->assign(array(
            'aGenres'   => $aGenres,
            'iCount'    => count($aGenres),
        ));
        return $oTpl->fetch('GenreView.html');
    }
}
?>